Benjamin Otte [Mon, 20 Nov 2017 02:54:42 +0000 (03:54 +0100)]
gdk: Make GdkContentFormats immutable
Benjamin Otte [Mon, 20 Nov 2017 01:47:45 +0000 (02:47 +0100)]
gdk: Add GdkContentFormatsBuilder
Yes, the name is too long.
No, I couldn't think of a shorter one.
Benjamin Otte [Sat, 18 Nov 2017 04:53:25 +0000 (05:53 +0100)]
gdkdnd: Make GdkDragContext->formats a GdkContentFormats
Instead of it being a GList of GdkAtoms.
Benjamin Otte [Sat, 18 Nov 2017 01:19:53 +0000 (02:19 +0100)]
contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
Benjamin Otte [Fri, 17 Nov 2017 16:31:59 +0000 (17:31 +0100)]
gdk: Move GtkTargetList to GDK
It's gonna be renamed next, so put it in the right source file already.
For now retain the old name to keep the diff small.
Benjamin Otte [Fri, 17 Nov 2017 13:26:16 +0000 (14:26 +0100)]
selection: Make GtkTargetList members private
Outside of the target list, don't access it directly, instead use public
APIs like the newly introduced gtk_target_list_intersects().
Benjamin Otte [Thu, 16 Nov 2017 23:28:53 +0000 (00:28 +0100)]
dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.
This will be fixed later.
Matthias Clasen [Mon, 20 Nov 2017 03:40:07 +0000 (22:40 -0500)]
emoji chooser: break out a helper function
This is just a small cleanup.
Matthias Clasen [Mon, 20 Nov 2017 03:38:07 +0000 (22:38 -0500)]
remove debug spew
Piotr Drąg [Sun, 19 Nov 2017 23:14:14 +0000 (00:14 +0100)]
Update POTFILES.in
Matthias Clasen [Sun, 19 Nov 2017 03:44:12 +0000 (22:44 -0500)]
entry: Add a key binding for the emoji chooser
Make Ctrl-. and Ctrl-; bring up the emoji chooser.
https://bugzilla.gnome.org/show_bug.cgi?id=789160
Matthias Clasen [Sun, 19 Nov 2017 23:03:07 +0000 (18:03 -0500)]
emoji chooser: Make menu key work as expected
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
Matthias Clasen [Sun, 19 Nov 2017 21:38:28 +0000 (16:38 -0500)]
Adwaita: Bring fix focus in flowbox
Bring back the focus rectangle for flowbox children.
Its absence makes keynav in flowboxes really difficult.
Matthias Clasen [Sun, 19 Nov 2017 21:18:28 +0000 (16:18 -0500)]
emoji chooser: handle right-click
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.
This commit makes right-click work to bring up the variation
selector for Emojis.
Matthias Clasen [Sun, 19 Nov 2017 19:47:24 +0000 (14:47 -0500)]
listbox: Listen to ::stopped on the press gesture
Otherwise, we end up interpreting grab notify's as
button releases, which is not right. This matches
what GtkFlowBox does.
Matthias Clasen [Sun, 19 Nov 2017 13:29:37 +0000 (08:29 -0500)]
Trivial cleanup
Better to use G_SOURCE_REMOVE than FALSE, for clarity.
Matthias Clasen [Sun, 19 Nov 2017 13:28:35 +0000 (08:28 -0500)]
emoji chooser: Don't leak gestures
We were not freeing these gestures as we should.
Matthias Clasen [Sat, 18 Nov 2017 13:18:11 +0000 (08:18 -0500)]
Some more interning
This avoids more strdups at startup.
Matthias Clasen [Sat, 18 Nov 2017 04:25:45 +0000 (23:25 -0500)]
a11y: Intern a string
Matthias Clasen [Sat, 18 Nov 2017 04:25:07 +0000 (23:25 -0500)]
cell area: Use GTK_PARAM_READWRITE consistently
Matthias Clasen [Sat, 18 Nov 2017 04:22:02 +0000 (23:22 -0500)]
wayland: Intern signal names
Matthias Clasen [Sat, 18 Nov 2017 04:21:24 +0000 (23:21 -0500)]
icon helper: Avoid a few string copies
Matthias Clasen [Sat, 18 Nov 2017 03:56:25 +0000 (22:56 -0500)]
styleproperty: Use G_PARAM_STATIC_STRINGS
Matthias Clasen [Sat, 18 Nov 2017 03:49:57 +0000 (22:49 -0500)]
gtk: Intern css names
This avoids a bunch of strdups at startup.
Matthias Clasen [Sat, 18 Nov 2017 03:47:49 +0000 (22:47 -0500)]
wayland: Intern settings keys
Matthias Clasen [Sat, 18 Nov 2017 03:47:11 +0000 (22:47 -0500)]
gdk: Intern signal names
We were forgetting this in a few places.
Matthias Clasen [Sat, 18 Nov 2017 02:38:08 +0000 (21:38 -0500)]
gdk: Use G_PARAM_SPEC_STATIC_STRINGS throughout
This avoids some string copies at startup.
Matthias Clasen [Fri, 17 Nov 2017 22:56:03 +0000 (17:56 -0500)]
settings: Use gdk_display_set_cursor_theme
This allows us to reduce the amount of ifdef ugliness.
Matthias Clasen [Fri, 17 Nov 2017 22:42:12 +0000 (17:42 -0500)]
Add private api for setting cursor theme
This is implemented in multiple gdk backends,
and we can avoid and ugly ifdef cascade in gtk
by adding a vfunc for this.
Matthias Clasen [Fri, 17 Nov 2017 21:34:04 +0000 (16:34 -0500)]
Include gdk-private.h
This gives us access to private gdk api.
Matthias Clasen [Fri, 17 Nov 2017 21:22:21 +0000 (16:22 -0500)]
gdk: Move code around
Move the gdk_display functions to gdkdisplay.c.
They are misplaced in gdkevents.c.
Matthias Clasen [Fri, 17 Nov 2017 20:40:49 +0000 (15:40 -0500)]
clipboard: Use gdk_display_get_last_seen_time
This removes the backend dependent code from gtkclipboard.c.
A good thing!
Matthias Clasen [Fri, 17 Nov 2017 20:39:08 +0000 (15:39 -0500)]
gdk: Add a private method to get a server timestamp
This is needed in the clipboard code. We don't make
it public, since that code is destined to eventually
live in gdk anyway.
Piotr Drąg [Fri, 17 Nov 2017 19:02:41 +0000 (20:02 +0100)]
Update POTFILES.in
Matthias Clasen [Fri, 17 Nov 2017 18:54:04 +0000 (13:54 -0500)]
Drop gdkscreen.h
Nothing uses GdkScreen anymore, so we can get rid of it.
Matthias Clasen [Fri, 17 Nov 2017 18:43:53 +0000 (13:43 -0500)]
quartz: Remove remaining uses of GdkScreen
Matthias Clasen [Fri, 17 Nov 2017 18:35:24 +0000 (13:35 -0500)]
quartz: Make GdkQuartzScreen a plain object
No need to derive this from GdkScreen anymore.
Matthias Clasen [Fri, 17 Nov 2017 18:32:03 +0000 (13:32 -0500)]
quartz: Drop an unused include
No GdkScreen apis are used in here.
Matthias Clasen [Fri, 17 Nov 2017 18:29:14 +0000 (13:29 -0500)]
quartz: Avoid a screen argument
The screen is never used in _gdk_quartz_screen_get_setting,
so drop it.
Matthias Clasen [Fri, 17 Nov 2017 18:46:45 +0000 (13:46 -0500)]
win32: Remove remaining uses of GdkScreen
Matthias Clasen [Fri, 17 Nov 2017 18:26:41 +0000 (13:26 -0500)]
win32: Make GdkWin32Screen a plain object
No need to derive this from GdkScreen anymore.
Matthias Clasen [Fri, 17 Nov 2017 18:21:24 +0000 (13:21 -0500)]
win32: Avoid a screen argument
The screen is never used in _gdk_win32_screen_get_setting,
so drop it.
Matthias Clasen [Fri, 17 Nov 2017 18:20:53 +0000 (13:20 -0500)]
win32: Remove an unused include
No GdkScreen apis are used in here.
Matthias Clasen [Fri, 17 Nov 2017 18:12:51 +0000 (13:12 -0500)]
Fix the build
Matthias Clasen [Fri, 17 Nov 2017 18:03:11 +0000 (13:03 -0500)]
x11: Drop GdkX11Visual as public api
There was no useful functionality left here,
so just remove this from the api altogether.
Matthias Clasen [Fri, 17 Nov 2017 15:37:52 +0000 (10:37 -0500)]
x11: Stop using GdkScreen altogether
Derive GdkX11Screen directly from GObject, and
remove the last remaining uses of GdkScreen.
Matthias Clasen [Fri, 17 Nov 2017 15:18:20 +0000 (10:18 -0500)]
x11: Stop using GdkScreen in api
This type is going away, so switch to using GdkX11Screen
everywhere.
Matthias Clasen [Fri, 17 Nov 2017 14:55:45 +0000 (09:55 -0500)]
Stop calling _gdk_screen_close
It does nothing useful, and is going away.
Matthias Clasen [Fri, 17 Nov 2017 12:46:44 +0000 (07:46 -0500)]
Stop including gdkscreen.h
It is not used anymore.
Philip Withnall [Fri, 17 Nov 2017 10:03:35 +0000 (10:03 +0000)]
broadway: Add missing dependency to build
The generated file clienthtml.h is #included by broadway-server.c, which
is one of the sources of the broadway library — so clienthtml.h needs to
be one of the sources of that library too.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790489
Alexander Larsson [Fri, 17 Nov 2017 09:37:01 +0000 (10:37 +0100)]
broadway: Fix toplevel handling
The toplevels list contains GdkWindowImplBroadways, and we shouldn't
free it.
Benjamin Otte [Fri, 17 Nov 2017 07:35:25 +0000 (08:35 +0100)]
gdk: Remove gdk_flush()
If you need to flush a display, use gdk_display_flush().
There is never a need to flush displays you don't know about.
Benjamin Otte [Fri, 17 Nov 2017 07:34:57 +0000 (08:34 +0100)]
gtk-demo: No need to gdk_flush() here
And if there was a need, GDK should have done it.
Benjamin Otte [Fri, 17 Nov 2017 06:51:22 +0000 (07:51 +0100)]
toolbar: Remove gdk_flush() calls
It's not 2003 anymore.
Benjamin Otte [Fri, 17 Nov 2017 06:47:03 +0000 (07:47 +0100)]
main: Don't gdk_flush() after every main loop wait
For a start, this makes gtk_main() work different from g_main_loop_run()
calls.
But most importantly, modern GDK does proper syncing itself and doesn't
need to rely on a catch-all to get it right.
Matthias Clasen [Fri, 17 Nov 2017 05:37:10 +0000 (00:37 -0500)]
Add a comment
Document that gdk-private.h is meant for private gdk<>gtk apis.
Matthias Clasen [Fri, 17 Nov 2017 05:34:04 +0000 (00:34 -0500)]
Remove gdkprivate.h
This is one-too-many private headers. Move the few
declarations here to gdkinternals.h.
Matthias Clasen [Fri, 17 Nov 2017 05:17:29 +0000 (00:17 -0500)]
Drop generic error trap api from the docs
Matthias Clasen [Fri, 17 Nov 2017 05:13:21 +0000 (00:13 -0500)]
Drop gdkmain.h
Matthias Clasen [Fri, 17 Nov 2017 05:09:43 +0000 (00:09 -0500)]
Stop including gdkmain.h
It is empty now.
Matthias Clasen [Fri, 17 Nov 2017 05:03:04 +0000 (00:03 -0500)]
Drop an empty file
Nothing deprecated left!
Matthias Clasen [Fri, 17 Nov 2017 05:02:01 +0000 (00:02 -0500)]
Drop the error trap vfuncs
No longer used.
Matthias Clasen [Fri, 17 Nov 2017 04:57:25 +0000 (23:57 -0500)]
Drop the generic error trap api
This is only implemented on X11, so we don't
need generic api for it.
Matthias Clasen [Fri, 17 Nov 2017 05:07:36 +0000 (00:07 -0500)]
tests: Test the x11-specific error trap api
The other one is gone.
Matthias Clasen [Fri, 17 Nov 2017 04:56:11 +0000 (23:56 -0500)]
x11: Fix error traps in the dnd code
The code for grabbing keys was using a generic
error trap call, and more concerning, it was forgetting
to pop the trap.
Matthias Clasen [Fri, 17 Nov 2017 04:42:55 +0000 (23:42 -0500)]
selection: Use x11-specific traps
The generic trap api is going away.
Matthias Clasen [Fri, 17 Nov 2017 04:36:21 +0000 (23:36 -0500)]
mountoperation-x11: Use x11-specific traps
The generic trap api is going away.
Matthias Clasen [Fri, 17 Nov 2017 04:27:00 +0000 (23:27 -0500)]
Drop an unused variable
These are no longer used.
Matthias Clasen [Fri, 17 Nov 2017 04:23:42 +0000 (23:23 -0500)]
Drop a duplicate definition
GDK_PRIORITY_EVENTS is already defined in gdkevents.h
Matthias Clasen [Fri, 17 Nov 2017 04:22:08 +0000 (23:22 -0500)]
Drop gdk_set_program_class
Together with the corresponding getter.
This is x11-specific functionality.
Matthias Clasen [Fri, 17 Nov 2017 04:18:58 +0000 (23:18 -0500)]
x11: Add gdk_x11_display_set_program_class
The program class is a very X-specific concept.
There should be x11-backend api to deal with it.
Matthias Clasen [Fri, 17 Nov 2017 04:18:03 +0000 (23:18 -0500)]
wayland: Stop using gdk_get_program_class
This is an abuse, at best. If we need to pass the
app id down here, lets pass the app id.
Matthias Clasen [Fri, 17 Nov 2017 04:00:01 +0000 (23:00 -0500)]
Remove gdk/gdkx.h
It was just a kludge.
Matthias Clasen [Fri, 17 Nov 2017 03:54:26 +0000 (22:54 -0500)]
Move some code around
Move gdk_disable_multidevice to gdkdisplaymanager.[hc].
Matthias Clasen [Fri, 17 Nov 2017 03:45:52 +0000 (22:45 -0500)]
Drop gdk_notify_startup_complete
This function and its variant are just wrappers
around the display-specific function.
Matthias Clasen [Fri, 17 Nov 2017 03:45:04 +0000 (22:45 -0500)]
gtk: Stop using gdk_notify_startup_complete_with_id
This function is about to go away. Instead, use the
display-specific function that this is a wrapper of.
Matthias Clasen [Fri, 17 Nov 2017 03:18:45 +0000 (22:18 -0500)]
gdk: Move some headers around
Move gdk_flush and gdk_set_allowed_backends to where they
belong.
Matthias Clasen [Fri, 17 Nov 2017 03:10:26 +0000 (22:10 -0500)]
Drop gdk_beep
This is an unnecessary wrapper around gdk_display_beep.
Matthias Clasen [Fri, 17 Nov 2017 03:09:44 +0000 (22:09 -0500)]
im context thai: Stop using gdk_beep
It is about to go away.
Matthias Clasen [Fri, 17 Nov 2017 03:04:25 +0000 (22:04 -0500)]
Drop gdk_set_double_click_time
This is an unnecessary and not-recommended-to-be-used
wrapper around gdk_display_set_double_click_time.
Benjamin Otte [Thu, 16 Nov 2017 21:50:37 +0000 (22:50 +0100)]
selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.
The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
Benjamin Otte [Wed, 15 Nov 2017 23:51:06 +0000 (00:51 +0100)]
selection: Remove gtk_target_table_*() functions
Benjamin Otte [Wed, 15 Nov 2017 23:43:31 +0000 (00:43 +0100)]
textview: Stop playing shenanigans with the target list
This breaks GtkSourceView adding custom targets on top of GtkTextView,
but we'll fix that later.
Benjamin Otte [Wed, 15 Nov 2017 18:47:56 +0000 (19:47 +0100)]
selection: Make GtkTargetEntry not allocatable
And remove it being registered as a boxed type (lol).
Matthias Clasen [Wed, 15 Nov 2017 23:08:46 +0000 (18:08 -0500)]
HighContrast: misc fixes
The HighContrast theme was not parsing anymore, due to
leftover widget style properties, and some missed cleanups,
like -gtk-icon-effect. Also update for the new focus handling,
and make checks and radios sharp again.
Matthias Clasen [Wed, 15 Nov 2017 23:07:52 +0000 (18:07 -0500)]
Adwaita: Make checks and radios sharp again
The assets we have are 14x14, set -gtk-icon-size to reflect that.
Matthias Clasen [Wed, 15 Nov 2017 19:20:40 +0000 (14:20 -0500)]
Change icon-size properties
We no longer support registering custom icon sizes, so
we can make these properties just enums. This also lets
us specify them by nick in ui files. Nice!
Matthias Clasen [Wed, 15 Nov 2017 18:23:51 +0000 (13:23 -0500)]
image: Update docs
Mention the new icon-size style classes, update the docs
for removed arguments and return values, and add new
functions to the docs.
Matthias Clasen [Wed, 15 Nov 2017 18:14:36 +0000 (13:14 -0500)]
Document -gtk-icon-size
Add this property to the list of CSS properties.
Matthias Clasen [Wed, 15 Nov 2017 13:11:01 +0000 (08:11 -0500)]
Support -gtk-icon-size for builtins
This makes css icons more similar to themed icons, which
is the overall goal here.
Matthias Clasen [Wed, 15 Nov 2017 04:30:58 +0000 (23:30 -0500)]
Drop gtk_icon_size_lookup
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
Matthias Clasen [Wed, 15 Nov 2017 03:38:10 +0000 (22:38 -0500)]
recentchooser: Use GIcon instead of GdkPixbuf
Matthias Clasen [Wed, 15 Nov 2017 03:29:31 +0000 (22:29 -0500)]
iconhelper: Query size via CSS
Instead of looking at the icon size, look at the CSS value for
-gtk-icon-size. Set style classes depending on icon size instead.
Trivially change Adwaita and HighContrast to report the same values as
before.
Matthias Clasen [Wed, 15 Nov 2017 02:14:47 +0000 (21:14 -0500)]
enums: Change GtkIconSize values
The new values are the ones we intend to keep. The old ones had
duplicated meanings and nobody knew which one to take.
Benjamin Otte [Tue, 24 Jan 2017 02:14:53 +0000 (03:14 +0100)]
image: Don't take icon size in set_from_definition()
Matthias Clasen [Wed, 15 Nov 2017 00:48:59 +0000 (19:48 -0500)]
filechooserwidget: icon size is always 16
Matthias Clasen [Wed, 15 Nov 2017 00:47:04 +0000 (19:47 -0500)]
filechooserbutton: icon size is always 16
So define it that way.
Benjamin Otte [Mon, 23 Jan 2017 18:59:27 +0000 (19:59 +0100)]
cellrendererspinner: Don't track old icon size
It was only used to avoid gtk_icon_size_lookup() calls and those aren't
expensive.
Matthias Clasen [Wed, 15 Nov 2017 00:43:13 +0000 (19:43 -0500)]
image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
Benjamin Otte [Sun, 22 Jan 2017 21:58:45 +0000 (22:58 +0100)]
image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.
As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.
Instead, provide gtk_image_get_icon_size() to query the icon size.